package javase.thread;

/**
 * @author hck soccerlover9527@gmail.com
 */
public class TestThreadLocal {
    public static void main(String[] args) {

    }

    static class Task implements Runnable {

        private static ThreadLocal<String> threadLocal = new ThreadLocal<>();
        private String msg = "";

        public Task(String msg) {
            this.msg = msg;
        }

        @Override
        public void run() {
            threadLocal.set(msg);

        }
    }
}
